Skip to content

Feat/external orders#228

Open
0xNazarii wants to merge 21 commits intofeat/deltaSlippageParamfrom
feat/externalOrders
Open

Feat/external orders#228
0xNazarii wants to merge 21 commits intofeat/deltaSlippageParamfrom
feat/externalOrders

Conversation

@0xNazarii
Copy link

@0xNazarii 0xNazarii commented Mar 11, 2026

Note

Medium Risk
Adds a new external-order flow (build/sign/post/pre-sign) and changes several core Delta order types/SDK exports, so integrators may see compile-time and behavioral differences when handling order responses and amount/partner-fee resolution.

Overview
Adds External Delta Orders support end-to-end: new ExternalOrder EIP-712 typed data, SDK methods to build/sign/post/preSign and a one-shot submitExternalDeltaOrder, plus docs and an Aave-based example.

Updates Delta order typing and APIs to be order-type aware (DeltaAuction now includes onChainOrderType and supports Order vs ExternalOrder payloads), extends getDeltaOrders with an onChainOrderType filter, and refactors shared slippage/partner-fee logic into helpers/misc (reused by both standard and external order builders).

Written by Cursor Bugbot for commit fc8bc08. This will update automatically on new commits. Configure here.

@github-actions
Copy link

github-actions bot commented Mar 11, 2026

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 16.98 KB (+3.05% 🔺)
dist/sdk.esm.js 16.88 KB (+2.59% 🔺)

Copy link
Member

@Velenir Velenir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add something into Readme or docs/Delta

Ideally you could also add some tests, but that can be done later

Comment on lines +15 to +17
export type DeltaOrderFromAPI = Omit<DeltaAuction, 'signature' | 'order'> & {
order: DeltaAuctionOrder | ExternalDeltaOrder;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So both normal Delta Orders and External Orders are returned together from the same endpoints?
It may be alright when requesting order by hash/id, you can know what kind of order you expect and are able to assert/check right away.
But for getting all /orders this will be a pain to check for types, especially when an array contains all different types DeltaOrderFromAPI[].

This make the change a breaking change too.

Would it be possible to add an extra request param to prefilter on API side?
Like we have OrdersFilter.type=MARKET|LIMIT, External would fit right in.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have OnChainOrderType on API (Order/ProductiveOrder/ExternalOrder and soon TWAPOrder), can add this filter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, something like that

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the filter and order type inference for the ease of usage

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants